'\" te
.\"  Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH ENABLE 1 "Feb 25, 2017"
.SH NAME
enable, disable \- enable/disable LP printers
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/enable\fR \fIprinter\fR...
.fi

.LP
.nf
\fB/usr/bin/disable\fR [\fB-c\fR | \fB-W\fR] [\fB-r\fR [\fIreason\fR]] \fIprinter\fR...
.fi

.SH DESCRIPTION
.LP
The \fBenable\fR command activates printers, enabling them to print requests
submitted by the \fBlp\fR command. \fBenable\fR must be run on the printer
server.
.sp
.LP
The \fBdisable\fR command deactivates printers, disabling them from printing
requests submitted by the \fBlp\fR command. By default, any requests that are
currently printing on \fIprinter\fR are reprinted in their entirety either on
\fIprinter\fR or another member of the same class of printers. The
\fBdisable\fR command must be run on the print server.
.sp
.LP
Use \fBlpstat\fR \fB-p\fR to check the status of printers.
.sp
.LP
Generally, \fBenable\fR and \fBdisable\fR are run on the print server to
control local print queues. Under some configurations, they can also be run on
client systems when IPP is being used to communicate between client and server.
.SH OPTIONS
.LP
The following options are supported for use with \fBdisable\fR:
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 15n
Cancels any requests that are currently printing on \fIprinter\fR. This option
cannot be used with the \fB-W\fR option. If the printer is remote, the \fB-c\fR
option is silently ignored.
.RE

.sp
.ne 2
.na
\fB\fB-W\fR\fR
.ad
.RS 15n
Waits until the request currently being printed is finished before disabling
\fIprinter\fR. This option cannot be used with the \fB-c\fR option. If the
printer is remote, the \fB-W\fR option is silently ignored.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR [\fIreason\fR]\fR
.ad
.RS 15n
Assigns a \fIreason\fR for the disabling of the printer(s). This \fIreason\fR
applies to all printers specified. This \fIreason\fR is reported by
\fBlpstat\fR \fB-p\fR. Enclose \fIreason\fR in quotes if it contains blanks.
The default reason is \fBunknown reason\fR for the existing printer, and
\fB"new printer"\fR for a printer added to the system but not yet enabled.
.RE

.SH OPERANDS
.LP
The following operand is supported for both \fBenable\fR and \fBdisable\fR:
.sp
.ne 2
.na
\fB\fIprinter\fR\fR
.ad
.RS 11n
The name of the printer to be enabled or disabled. Specify \fIprinter\fR using
atomic or URI-style (\fIscheme\fR\fB://\fR\fIendpoint\fR) names. See
\fBprinters.conf\fR(5) regarding the naming conventions for destinations.
.RE

.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 12n
Successful completion.
.RE

.sp
.ne 2
.na
\fBnon-zero\fR
.ad
.RS 12n
An error occurred.
.RE

.SH FILES
.ne 2
.na
\fB\fB/etc/printers.conf\fR\fR
.ad
.RS 24n
System printer configuration database
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.printers\fR\fR
.ad
.RS 24n
User-configurable printer database
.RE

.sp
.ne 2
.na
\fB\fBou=printers\fR\fR
.ad
.RS 24n
LDAP version of \fB/etc/printers.conf\fR
.RE

.sp
.ne 2
.na
\fB\fBprinters.conf.byname\fR\fR
.ad
.RS 24n
\fBNIS\fR version of \fB/etc/printers.conf\fR
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Obsolete
_
CSI	Enabled
.TE

.SH SEE ALSO
.LP
.BR lp (1),
.BR lpstat (1),
.BR printers.conf (5),
.BR attributes (7)
.SH NOTES
.LP
When IPP is in use, the user is prompted for a passphrase if the remote print
service is configured to require authentication.
